<html>
<head>
<link rel='stylesheet' href='../../../../../../../../../../js/sh/SyntaxHighlighter.css' type='text/css' />
<script src='../../../../../../../../../../js/sh/shCore.js'></script>
<script src='../../../../../../../../../../js/sh/shBrushJava.js'></script>
<style>
* {
font-family:Courier New,monospace;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  font-size: 11px;
}
.dp-highlighter {
  white-space: nowrap;
  overflow: visible;
  width: 600px;
  font-size: 11px;
  font-family:Courier New,monospace;
}
</style>
</head>
<body>
<textarea name='code' class='java:nogutter' rows='15' cols='120'>
<DataSource
    ID="supplyItemDMI"
    serverType="generic"
    testFileName="supplyItem.data.xml"
>
    <fields>
        <field name="itemID"      type="sequence" hidden="true"       primaryKey="true"/>
        <field name="itemName"    type="text"     title="Item"        length="128"       required="true"/>
        <field name="SKU"         type="text"     title="SKU"         length="10"        required="true"/>
        <field name="description" type="text"     title="Description" length="2000"/>
        <field name="category"    type="text"     title="Category"    length="128"       required="true"
               foreignKey="supplyCategory.categoryName"/>
        <field name="units"       type="enum"     title="Units"       length="5">
            <valueMap>
                <value>Roll</value>
                <value>Ea</value>
                <value>Pkt</value>
                <value>Set</value>
                <value>Tube</value>
                <value>Pad</value>
                <value>Ream</value>
                <value>Tin</value>
                <value>Bag</value>
                <value>Ctn</value>
                <value>Box</value>
            </valueMap>
        </field>
        <field name="unitCost"    type="float"    title="Unit Cost"   required="true">
            <validators>
                <validator type="floatLimit" precision="2" min="0" errorMessage="Please enter a valid cost"/>
            </validators>
        </field>
        <field name="inStock"   type="boolean"  title="In Stock"/>
        <field name="nextShipment"  type="date" title="Next Shipment"/>
    </fields>

    <serverObject lookupStyle="new" className="com.isomorphic.examples.SupplyItemDMI"/>


    <!-- You can define an operationBindings section to bind operation names to server method
         (potentially additionally discriminated by the operationId).
         In the absense of this section, the server will look for a server method named after
         the operationType.  
    -->
    <!--
    <operationBindings>
        <binding operationType="fetch" serverMethod="fetch">
        <serverObject  lookupStyle="new" className="com.isomorphic.examples.SupplyItemDMI"/>
        </binding>
    </operationBindings>
    -->
</DataSource>
</textarea>
<script class='javascript'>
dp.SyntaxHighlighter.HighlightAll("code");
</script>
</body>
</html>
